
// Copyright (C) 2007 Richard Uhler
// This file is part of Esiply.
//
// Esiply is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License, Version 2,
// as published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

#ifndef _SOURCE_ELEMENT_H_
#define _SOURCE_ELEMENT_H_
//#define GC_THREADS
// A SourceElement is either a Statement or a Function
// Declaration. That is its only purpose. To hold and distinguish
// between one or the other.
//#include <gc_cpp.h>

class FunctionDeclaration;
class Statement;

class SourceElement  
{
public:
    SourceElement(Statement* stmt);
    SourceElement(FunctionDeclaration* fdec);

    // Return true if this is a statement 
    // Return false if this is a function declaration
    bool isStmt() const;
    Statement* getStmt() const;
    FunctionDeclaration* getFDec() const;

private:
    Statement* m_stmt;
    FunctionDeclaration* m_fdec;
};

#endif//_SOURCE_ELEMENT_H_

